package chamber.n02.factorial;

import static com.google.common.base.Preconditions.checkArgument;

/**
 * Created by Gerardo on 2/3/14.
 */
public class FactorialRecursive implements Factorial {
	@Override
	public Long apply(final Long input) {
		checkArgument(input > 0, "input must be positive");

		return (input <= 1)? 1 : apply(input - 1);
	}
}
